package com.hl.shifangzhiyu.service.Impl;

import com.hl.shifangzhiyu.mapper.InfoNoticeMapper;
import com.hl.shifangzhiyu.pojo.InfoNotice;
import com.hl.shifangzhiyu.service.InfoNoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class InfoNoticeServiceImpl implements InfoNoticeService {
    @Autowired
    private InfoNoticeMapper infoNoticeMapper;
    @Override
    public List<InfoNotice> getAll() {
        return infoNoticeMapper.findAll();
    }
    @Override
    public InfoNotice getById(int id) {
        return infoNoticeMapper.findById(id);
    }
    @Override
    public void save(InfoNotice infoNotice) {
        infoNoticeMapper.insert(infoNotice);
    }

    @Override
    public void update(InfoNotice infoNotice) {
        infoNoticeMapper.update(infoNotice);
    }

    @Override
    public void delete(int id) {
    infoNoticeMapper.deleteById(id);
    }

}
